Skip to main content

merge

Type

function

Summary

Evaluates any expressions in a string, replaces them with their value, and returns the transformed string.

Syntax

merge(<stringToEvaluate>)

Description

The merge function Evaluates any expressions in double square brackets, and replaces them with the expression's value.

It also executes any return statements enclosed in "<?" and "?>", and replaces them by the value returned.

Parameters

NameTypeDescription

stringToEvaluate

string

A string of any length, which may include expressions enclosed in double square brackets ([[expression]]) and return statements enclosed in "?" and "?" (?return expression?).

Examples

merge("1+1 equals [[1+1]]") -- returns "1+1 equals 2"
merge("The current folder is [[the defaultFolder]]")

control structure: return, function

function: value

glossary: statement, evaluate, return, expression

keyword: string

Compatibility and Support

Introduced

LiveCode 1.1

OS

mac

windows

linux

ios

android

Platforms

desktop

server

mobile

Thank you for your feedback!

Was this page helpful?